Skip to content

put the cross-language scoreboard up front, and say why both backends exist - #597

Merged
kacy merged 1 commit into
mainfrom
docs-scoreboard
Jul 27, 2026
Merged

put the cross-language scoreboard up front, and say why both backends exist#597
kacy merged 1 commit into
mainfrom
docs-scoreboard

Conversation

@kacy

@kacy kacy commented Jul 27, 2026

Copy link
Copy Markdown
Owner

summary

two things a reader had to assemble themselves.

the first is a straight comparison against other languages. the numbers were
spread across five sections and three documents, so docs/performance.md now
opens with two tables — coordination and compute — putting pith next to go,
rust, and zig on every benchmark this repo runs, with the backend named on the
rows where it matters. the three-sentence summary underneath: green beats rust
and zig on coordination and beats go when pinned to one worker, spawn is ~2x go
at go's memory, and compute is competitive with go and well behind rust and zig
with string building the remaining gap.

the second is which backend to use, which the docs never actually answered.
green wins every measured shape, so the interesting half is why the os-thread
backend is still there, and it is not inertia:

  • a blocking call stalls a green worker and everything pinned to it. the
    reactor covers sockets, but dns, file i/o, and native calls do not yield. on
    os threads that call costs only the task making it.
  • the reactor is epoll-only. macos and the bsds compile a stand-in with no
    reactor, so green there blocks a worker on every socket wait — "green by
    default" is a linux-server claim, not a universal one.
  • preemption is free on os threads and a build-time opt-in under green.
  • os threads are the oracle green is checked against. verify-green-corpus
    diffs the corpus under green against os-thread output, which is how the
    single-worker deadline bug surfaced.

the first two of those were missing from docs/limitations.md, so they are
added there as gates on the eventual default flip.

what was tested

make docsite-check (docsite output matches the golden files). docs only — no
code, no examples touched.

… exist

two things a reader had to assemble themselves.

the first is a straight comparison. the numbers were spread across five
sections and three documents, so docs/performance.md now opens with two
tables — coordination and compute — that put pith next to go, rust, and zig
on every benchmark this repo runs, with the backend named on the rows where
it matters. the summary underneath is three sentences: green beats rust and
zig on coordination and beats go pinned to one worker, spawn is ~2x go at
go's memory, and compute is competitive with go and well behind rust and zig
with string building the remaining gap.

the second is which backend to use, which the docs never actually answered.
green wins every measured shape, so the interesting half is why os threads
are still there, and it is not inertia. blocking calls stall a green worker
and everything pinned to it — the reactor covers sockets, but dns, file i/o,
and native calls do not yield — where on os threads a blocking call costs
only the task making it. the reactor is also epoll-only, so macos and the
bsds run green with no reactor at all and block a worker on every socket
wait; "green by default" is a linux-server claim rather than a universal one.
and preemption is free on os threads but needs a build flag on green.

there is a fourth reason that matters to the repo rather than to a user, and
it is worth writing down: the os-thread backend is the oracle the green one
is checked against. verify-green-corpus diffs the whole corpus under green
against the output os threads produce, which is how the single-worker
deadline bug surfaced. two implementations that have to agree is a testing
asset worth keeping past the point where one is faster.
@kacy
kacy merged commit 364cecf into main Jul 27, 2026
2 checks passed
@kacy
kacy deleted the docs-scoreboard branch July 27, 2026 01:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant